package com.topisv.tms.repository.log;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.log.OrderLog;

/**
 * 订单日志_DAO
 * @author ch
 *
 */
public abstract interface OrderLogDao extends PagingAndSortingRepository<OrderLog, Long>, JpaSpecificationExecutor<OrderLog>
{

	@Query("select t from OrderLog t where t.orderno=? order by t.id")
	List<OrderLog> loadLogByOrderno(String orderno);
	
	@Query("select t from OrderLog t where t.orderno=? order by t.operateTime desc")
	List<OrderLog> loadLogByOrdernoD(String orderno);
	
	@Query("select t from OrderLog t where t.orderno=?1 and operateType=?2 order by t.id")
	List<OrderLog> loadLogByOrdernoAndOperateType(String orderno,String operateType);


}